package com.project.controller;

import com.project.bean.ChannelBean;
import com.project.service.IChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.print.DocFlavor;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("channel")
public class ChannelController {
    @Autowired
    private IChannelService service;

    @RequestMapping("findAll")
    public List<ChannelBean> findAll(){
        List<ChannelBean> list = new ArrayList<>();
        list = service.findByAll();
        return list;
    }
}
